OpenLayers Cookbook by Perez Antonio Santiago

OpenLayers Cookbook by Perez Antonio Santiago

Author:Perez, Antonio Santiago
Language: eng
Format: epub, pdf
Publisher: Packt Publishing


Chapter 5. Adding Controls

In this chapter we will cover:

Adding some visual controls

Adding the NavigationHistory control

Working with geolocation

Placing controls outside the map

Editing features on multiple vector layers

Modifying features

Measuring distances and areas

Getting feature information from a data source

Getting information from a WMS server

Introduction

This chapter explores from the basics, the most important and common controls that OpenLayers offers us as developers. Controls allow us to navigate through the map, play with layers, zoom in or out, perform actions such as editing features, measuring distances, and the like. In essence, controls allow us to interact.

The OpenLayers.Control class is the base class for all the controls and contains the common properties and methods that a control can have. We can summarize this as follows:

A control is attached to a map

A control can trigger events

A control can be activated or deactivated

A control can have a visual representation (such as a button) or have no visual representation (such as the drag action)



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.